const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')

const {reg_schema_user} = require('../schema/user')
const userHandler = require('../routers_handler/user_handler')


// 注册路由
router.post('/api/register', expressJoi(reg_schema_user), userHandler.user_register)


// 登录路由
router.post('/api/login', expressJoi(reg_schema_user), userHandler.user_login)


// 个人中心路由
router.get('/userinfo', userHandler.userinfo)


module.exports = router
